// import Vue from 'vue'
import App from './App.vue'
import router from './router'
// import './plugins/element.js'
// import axios from 'axios';
import nprogress from 'nprogress'
// import 'nprogress/nprogress.css'
// 配置请求的跟路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
    //请求拦截器
axios.interceptors.request.use(function(config) {
        nprogress.start()
        config.headers.Authorization = sessionStorage.getItem('token')
        return config
    })
    //响应拦截器
axios.interceptors.response.use(config => {
    nprogress.done();
    return config
})
Vue.prototype.$http = axios
Vue.config.productionTip = false

new Vue({
    router,
    render: h => h(App)
}).$mount('#app')